package com.li.springbootproject.controller.spring;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author LiDong
 * @version 1.0.0
 * @className SpringTestOneController.java
 * @createTime 2021年08月25日 22:22:00
 */
@RestController
@RequestMapping("/spring/one")
@Scope(value = "protype")
public class SpringTestOneController {

    private static final Logger logger = LoggerFactory.getLogger(SpringTestOneController.class);


    private static int NUM = 0;

    private int flag = 0;

    @RequestMapping("/one")
    public void testOne() {
        logger.info("普通变量：{}  静态变量：{}", flag++, NUM++);
    }

}
